package org.lemon.transport.context.data.tenant;

import java.util.Objects;

public class TenantId {

    public static final TenantId SYS_TENANT_ID = TenantId.valueOf(1L);

    private Long value;

    private TenantId(Long value) {
        this.value = value;
    }

    public Long getValue() {
        return this.value;
    }

    public static TenantId valueOf(long value) {
        return new TenantId(value);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TenantId tenantId = (TenantId) o;
        return Objects.equals(value, tenantId.value);
    }

    @Override
    public int hashCode() {
        return Long.hashCode(value);
    }
}
